/**
 * @author salman.humdullah
 */
exports.GAPromotionModel = Core.Class.subclass({
	classname: 'GAPromotionModel',
	initialize : function() {
		this._adtype = null;
		this._pfilter = null;
		this._id = null;
		this._frequency = null;
		this._promotionID = null;
		this._promotionFrequency = null;
		this._promotionText = null;
		this._promotionURL = null;
		this._promotionThumbnailURL = null;
		this._type = null;
		this._priority = null;
	},
	parse: function(promotion){
		this._pfilter = promotion['@pfilter'];
		this._frequency = promotion['@frequency'];
		this._adtype = promotion['@adtype'];
		this._type = promotion['@type'];
		this._id = promotion['@id'];
		var priority = promotion['@priority'];
		if(priority != 'undefined' && priority != null){
			this._priority = priority;
		}
		this._promotionURL = promotion.promotionURL;
		this._promotionThumbnailURL = promotion.promotionThumbnailURL;
		this._promotionText = promotion.promotionText;
		this._promotionID = promotion.promotionId;
	},
	setID: function(id){
		this._id = id;
	},
	getID: function(){
		return this._id;
	},
	setPriority: function(pri){
		this._priority = pri;
	},
	getPriority: function(){
		return this._priority;
	},
	setFrequency: function(freq){
		this._frequency = freq;
	},
	getFrequency: function(){
		return this._frequency;
	},
	
	setPromotionID : function(promotionID) {
		this._promotionID = promotionID;
	},
	getPromotionID : function() {
		return this._promotionID;
	},
	setPromotionFrequency : function(promotionFrequency) {
		this._promotionFrequency = promotionFrequency;
	},
	getPromotionFrequency : function() {
		return this._promotionFrequency;
	},
	setPromotionText : function(promotionText) {
		this._promotionText = promotionText;
	},
	getPromotionText : function() {
		return this._promotionText;
	},
	setPromotionURL : function(promotionURL) {
		this._promotionURL = promotionURL;
	},
	getPromotionURL : function() {
		return this._promotionURL;
	},
	setPromotionThumbnailURL : function(promotionThumbnailURL) {
		this._promotionThumbnailURL = promotionThumbnailURL;
	},
	getPromotionThumbnailURL : function() {
		return this._promotionThumbnailURL;
	},
	setType : function(type) {
		this._type = type;
	},
	getType : function() {
		return this._type;
	},
	setAdType : function(adtype) {
		this._adtype = adtype;
	},
	getAdType : function() {
		return this._adtype;
	},
	setPFilter : function(filter) {
		this._pfilter = filter;
	},
	getPFilter : function() {
		return this._pfilter;
	},
	destroy : function(){
		this._frequency = null;
		this._adtype = null;
		this._id = null;
		this._pfilter = null;
		this._promotionID = null;
		this._promotionFrequency = null;
		this._promotionText = null;
		this._promotionURL = null;
		this._promotionThumbnailURL = null;
		this._type = null;
		this._priority = null;
		
	}
});
 